//: reusing/Orc.java
// The protected keyword.
package chapter7;

import static utility.Print.*;

import java.util.ArrayList;
import java.util.Arrays;

import simple.*;

/**
 * Exercise 23: (2) Prove that class loading takes place only once. Prove that
 * loading may be caused by either the creation of the first instance of that
 * class or by the access of a static member.
 * 
 * @author rDiaconescu
 * 
 */

class Animal {
	static int dnaSize = 2;

	public Animal() {
	    super();
	    print(dnaSize);
	    dnaSize = 3;
	    // TODO Auto-generated constructor stub
    }
	
	
}

class MyBeetle extends Animal{
	static int age = initializeValue("Initializing age", 2);
	static int size;
	
	static public int initializeValue (String s, int i) {
		print(s);
		return i;
	}
	
	static void roar() {
		print("Roar!!");
	}

	public MyBeetle() {
	    super();
	    print(dnaSize);
	}
	
}

public class Exercise23 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		MyBeetle b = new MyBeetle();
		//MyBeetle.roar();
		
	}
}
